<?php
ini_set("default_charset", "utf-8");
@session_start();
if(!isset($_SESSION['usuCod'])){   
	echo "<script>window.location.href='index.php'</script>";
}
require_once('lib/conexion.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.:Softgi</title>
<link rel="shortcut icon" href="interfaz/favicon.ico" type="image/x-icon" />

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/ckm!estilo.css" />

<!-- MENU TREE -->
<link rel="stylesheet" type="text/css" href="css/jquery.treeview.css" />

<!-- MODAL -->
<link rel="stylesheet" type="text/css" href="css/modal.css" />
<!--[if lt IE 7]>
<link type='text/css' href='css/modal_ie.css' rel='stylesheet' media='screen' />
<![endif]-->



<!-- <script src="js/jquery.js" type="text/javascript"></script> -->
<!-- Librerias de los tabs -->
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> 
 <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
 <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
 <!-- <script src="js/jquery-ui.js"></script>  -->
 <!-- <link rel="stylesheet" href="/resources/demos/style.css">  -->


<script src="js/jquery.cookie.js" type="text/javascript"></script>
<script src="js/jquery.treeview.js" type="text/javascript"></script>

<script src="js/jquery.hashchange.min.js" type="text/javascript"></script> 
<!-- <script src="js/jquery.easytabs.min.js" type="text/javascript"></script>  -->

<script type='text/javascript' src='js/jquery.simplemodal.js'></script>



<style>
  #dialog label, #dialog input { display:block; }
  #dialog label { margin-top: 0.5em; }
  #dialog input, #dialog textarea { width: 95%; }
  #tabs { margin-top: 1em; }
  #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
  #add_tab { cursor: pointer; }
</style>



<script type="text/javascript">
//-----------------------------------------------------------
// MENU TREE
//-----------------------------------------------------------
$(function() {
	var datos = "accion=0";
	$('#divMenuVert').load("interna_envia.php",datos);
	
});

//-----------------------------------------------------------
// TABS
//-----------------------------------------------------------
/*$(document).ready( function() {
  $('#tab-container').easytabs({  
   	animate: true,
  	animationSpeed: 1000
  });
}); */

//-----------------------------------------------------------
// MODAL
//-----------------------------------------------------------
// BASICO
jQuery(function ($) {
	// Load dialog on page load
	//$('#basic-modal-content').modal();

	// Load dialog on click
	$('#lk_herraSistema').click(function (e) {
		//$('#basic-modal-content').modal();
		$('#basic-modal-content').modal({
			containerCss: {
            width: 720,
            height: '90%'
        },			
			closeHTML: "<a href='#' title='Cerrar' class='modal-close'><img src='interfaz/ico_cerrar.gif' /> &nbsp;&nbsp;</a>"
		});
		
		return false;
	});
});

//CONFIRM
/*jQuery(function ($) {
	$('#confirm-dialog input.confirm, #confirm-dialog a.confirm').click(function (e) {
		e.preventDefault();

		// example of calling the confirm function
		// you must use a callback function to perform the "yes" action
		confirm("Continue to the SimpleModal Project page?", function () {
			//window.location.href = 'http://simplemodal.com';
		});
	});
});

function confirm(message, callback) {
	$('#confirm').modal({
		closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
		position: ["20%",],
		//overlayId: 'confirm-overlay',
		containerId: 'confirm-container', 
		onShow: function (dialog) {
			var modal = this;

			$('.message', dialog.data[0]).append(message);

			// if the user clicks "yes"
			$('.yes', dialog.data[0]).click(function () {
				// call the callback
				if ($.isFunction(callback)) {
					callback.apply();					
				}
				// close the dialog
				modal.close(); // or $.modal.close();
			});
		}
	});
}*/

//-----------------------------------------------------------
// CERRAR ALERTA
//-----------------------------------------------------------
$(document).ready(function() {

	$("#expan").click(function(){
		$("#alerta div").slideToggle(200);
	});


	$("#alerta span.cerrar").click(function(){
		$("#alerta").fadeOut(200);
	});
});

function CerrarSes(){
	window.location.href='index.php';
}

function FmostrarContPri(opc){
	var datos = "accion=2&opc="+opc;
	$('#tab-container').load("admin_usua.php");	
}

function FmostrarMen(comd){
	$('#tab-container').html("");
	$('#tab-container').load("interna_envia.php","accion=1&comd="+comd);
}

</script>

</head>

<body>

<!-- ================== CABEZOTE MENU OPCIONES =======================  -->
<?php
$sql1b="SELECT CONCAT(usu_nombres,' ',usu_apellidos) AS nombre,usu_email,usu_url_foto FROM usuarios WHERE usu_codigo=".$_SESSION['usuCod'];
$rs1b= mysql_query($sql1b);
$row1b = mysql_fetch_array($rs1b);
?>
<div id="container">
    <div class="header">
	    <div class="margen">
	        <a href="#"><img src="interfaz/softgi.png" /></a>
            
            <div class="dr">
            	<div class="iconos">
                	<a href="#" id="lk_herraSistema">
                    	<img title="Herramientas del Sistema" src="interfaz/ico_menuHor/ico_config2.png" />
                    </a>
                    
                	<img src="interfaz/ico_menuHor/ico_gmail.png" />
                    
                	<a href="#" id="lk_usuarios" onclick="FmostrarContPri(1)">
                    	<img title="Administrar Usuarios" src="interfaz/ico_menuHor/ico_usuario.png" />
                    </a>
                	<a href="#" onclick="CerrarSes();" title="Cerrar Sesion" >
                    	<img title="Cerrar Sesi&oacute;n" src="interfaz/ico_menuHor/ico_cerrar.png" />
                    </a>
                </div>
            	<div>
            		
                    <?php
					if($row1b['usu_url_foto'] == ""){ // vacia
                    	?><?php echo $row1b['nombre'] ?> <img width="41" height="52" src="imagenes/perfiles/avatar-sin-imagen.png" class="foto" /><?php
                    }else{
						?><?php echo $row1b['nombre'] ?> <img width="41" height="52" src="<?php echo $row1b['usu_url_foto'] ?>" class="foto" /><?php
					}
					?>
                    
                    
            	</div>
            </div>
        </div>
	</div>
<!-- ================== FIN CABEZOTE MENU OPCIONES =======================  -->

<div id="divContPrincipal" >
    <div class="wrapper">
            <div class="content">
                <div class="margen">
                    <div id="tab-container" class="tab-container">
                        <br /><br /><br /><br /><br />
    					<br /><br /><br /><br /><br />
                        <br /><br /><br /><br /><br />
                        <br /><br /><br /><br /><br />
                        <br /><br /><br /><br /><br />
                        
                    </div>
                </div>
            </div>
    </div>
</div>

   

<!-- ======== MENU VERTICAL IZQ ============ -->
<div id="divMenuVert">
    	
</div>


<!-- ALERTA *************************************************************************** -->
<div id="alerta"    style="display:none">
	<span class="cerrar">x</span>
	<span id="expan"><img src="interfaz/tri_dw.png" class="tri" /> ATENCIÓN</span>
	<div>
	<h3>Título Ventana Modal</h3>
	<p>Mensaje de Alerta para el usuario.</p>
	</div>
</div>


<!-- CONTENIDOS MODALES *************************************************************************** -->

<!-- BASICO --> 
<div id="basic-modal-content"  style="display:none" class='panel-container' >
	<div class='header'><span>.:Herramientas del Sistema:.</span></div>
	<div class="margen">
	<?php include 'herra_sistema.php' ?>
	</div>
</div>

<!-- CONFIRMAR -->
<div id='confirm'>
	<div class='header'><span>Confirm</span></div>
	<div class='message'></div>
	<div class='buttons'>
		<div class='no simplemodal-close'>No</div><div class='yes'>SI</div>
	</div>
</div>

<!-- END CONTENIDOS MODALES *************************************************************************** -->



<div class="footer">
		<div id="div_footer" class="margen">
        		    	
		</div>
    </div>
    
<div id="mns1">
</div>  
</body>
</html>
